package loader;

import java.util.HashMap;

import loader.parser.adapter.Adapter455Tuan;
import loader.parser.adapter.Adapter4MeiTuan;
import loader.parser.adapter.SiteAdapter;

public class Configuration {

	private static HashMap<String, SiteAdapter> adapters;
	private static String destDir;

	static {// read configuration file
		adapters = new HashMap<String, SiteAdapter>();
		readConfigFile();
	}

	private static void readConfigFile() {
		adapters.put("meituan", new Adapter4MeiTuan());
		adapters.put("wowotuan", new Adapter455Tuan());
	}

	public static SiteAdapter getAdapter(String siteName) {
		return adapters.get(siteName);
	}

	public static String getDir() {
		return destDir;
	}
}
